import request from '@/utils/request'

const review = {
  add(data) {
    return request.post('/bzh/standardSystem/add', data);
  },
  update(data) {
    return request.post('/bzh/standardSystem/update', data);
  },
  delete(id){
    return request.post(`/bzh/standardSystem/delete/${id}`)
  },
  detailById(id){
    return request.get(`/bzh/standardSystem/detail/${id}`);
  },
  standardSystemTree(){
    return request.get(`/bzh/standardSystem/tree`);
  },
  // 根据项目id获取某个项目的所有立项论证信息
  projectExpertsInfo(projectId) {
    return request.get(`/bzh/projectExpertsInfo/getByProjectId/${projectId}`);
  },
  // 某个项目添加专家评审信息
  projectExpertsInfoUpdate(data) {
    return request.post(`/bzh/projectExpertsInfo/update`, data);
  },
  projectExpertsInfoDetail(id) {
    return request.get(`/bzh/projectExpertsInfo/detail/${id}`);
  },
  getReviewResult(reviewType) {
    return request.get(`/bzh/project/getReviewResult/${reviewType}`);
  },
  addReviewResult(data) {
    return request.post(`/bzh/projectReviewResults/add`, data);
  },
  projectExpertsInfoByReviewType(params){
    return request.get(`/bzh/projectExpertsInfo/getByReviewType`, {
      params
    })
  },
  projectExpertsInfoByReviewTypeForReview(params){
    return request.get(`/bzh/projectExpertsInfo/getByReviewTypeForReview`, {
      params
    })
  },
  projectReviewTeamGetByBusinessIdAndReviewType(params){
    return request.get(`/bzh/projectReviewTeam/getByBusinessIdAndReviewType`,{
      params
    })
  },
  indexList(params){
    return request.get('/bzh/reviewIndex/list', {params});
  },
  indexGet(id){
    return request.get(`/bzh/reviewIndex/detail/${id}`);
  },
  indexUpdate(data){
    return request.post(`/bzh/reviewIndex/update`,data);
  },
  indexAdd(data){
    return request.post(`/bzh/reviewIndex/add`,data);
  },
  indexDel(id){
    return request.post(`/bzh/reviewIndex/delete/${id}`);
  },
  //
  // 新增评审组
  teamAdd(data){
    return request.post(`/bzh/reviewTeam/add`,data);
  },
  // 修改评审组
  teamUpdate(data){
    return request.post(`/bzh/reviewTeam/update`,data);
  },
  // 删除评审组
  teamDel(id){
    return request.post(`/bzh/reviewTeam/delete/${id}`);
  },
  // 获取评审组
  teamGet(id){
    return request.get(`/bzh/reviewTeam/detail/${id}`);
  },
  // 评审组树状列表
  teamTree(params){
    return request.get('/bzh/reviewTeam/tree', {params});
  },
  teamList(params){
    return request.get('/bzh/reviewTeam/list', {params});
  },
  // 评审组绑定项目
  teamInnovationAdd(data){
    return request.post('/bzh/innovationReviewTeam/add',data)
  },
  // 评审组绑定多个项目
  teamProjectAddList(data){
    return request.post('/bzh/projectReviewTeam/addList',data)
  },
  // 删除项目与评审组绑定关系
  teamProjectDel(id){
    return request.post(`/bzh/projectReviewTeam/delete/${id}`);
  },
  // // 根据评审组id获取该分组下所有项目
  teamProjectGet(id){
    return request.get(`/bzh/projectReviewTeam/getByTeamId/${id}`);
  },
  // 查询项目列表
  teamInnovationList(params){
    return request.get('/bzh/innovations/waitReviewList',{params})
  },
  //
  teamProjectListByReviewType(params){
    return request.get(`/bzh/localStandard/getByReviewType`, {params})
  },
  teamSmartProjectListByReviewType(params){
    return request.get(`/bzh/project/getByReviewTypeSmart`, {params})
  },
  // 查询专家列表
  teamExpertList(params){
    return request.get('/bzh/expertsReviewTeam/expertsList',{params})
  },
  teamSmartExpertList(params){
    return request.get('/bzh/expertsReviewTeam/smartExpertsList',{params})
  },
  // 新增单个专家与评审组绑定
  teamExpertAdd(data){
    return request.post('/bzh/expertsReviewTeam/add',data)
  },
  // 新增多个专家与评审组绑定
  teamExpertAddList(data){
    return request.post('/bzh/expertsReviewTeam/addList',data)
  },
  // 删除专家与评审组绑定关系
  teamExpertDel(id){
    return request.post(`/bzh/expertsReviewTeam/delete/${id}`)
  },
  // 根据评审组id获取该分组下所有专家
  teamExpertGet(id){
    return request.get(`/bzh/expertsReviewTeam/getByTeamId/${id}`);
  },
  // 添加专家评审信息
  teamExpertsInfoUpdate(data){
    return request.post(`/bzh/projectExpertsInfo/update`, data);
  },
  // 组专家评审详情
  teamExpertsInfoGet(id){
    return request.get(`/bzh/projectExpertsInfo/detail/${id}`);
  },
  // 初始化项目与专家评审信息
  teamInfoInit(id){
    return request.post(`/bzh/projectExpertsInfo/init/${id}`);
  },
  // 根据项目id获取某个项目的所有专家评审信息
  teamInfoGetByProjectId(id){
    return request.get(`/bzh/projectExpertsInfo/getByProjectId/${id}`);
  },
  //
  teamProjectReviewUpdate(data){
    return request.post(`/bzh/projectReviewTeam/update`,data);
  },
  projectReviewTeamGet(id){
    return request.get(`/bzh/projectReviewTeam/detail/${id}`);
  },
  reviewUserProjectAdd(data){
    return request.post(`/bzh/reviewUserProject/add`,data);
  },
  reviewUserProjectGetByUserId(id){
    return request.get(`/bzh/reviewUserProject/getByUserId/${id}`);
  },
  zjSignPdf(data){
    return request.post(`/bzh/projectExpertsInfo/zjSignPdf`, data);
  },
  sendMsgByTeamId(id){
    return request.get(`/bzh/expertsReviewTeam/sendMsgByTeamId/${id}`);
  },
  sendMsgById(id){
    return request.get(`/bzh/expertsReviewTeam/sendMsgById/${id}`);
  },
  // 设置评审组专家组长
  setTeamLeader(data){
    return request.post(`/bzh/expertsReviewTeam/setTeamLeader`, data);
  },
  // 专家评审组意见列表
  teamLeaderMyReviewList(params){
    return request.get(`/bzh/expertsReviewTeam/myReviewList`, {params});
  },
  // 专家评审组意见列表
  teamLeaderAllReviewList(params){
    return request.get(`/bzh/expertsReviewTeam/allReviewList`, {params});
  },
  // 评审意见模版
  reviewTemplate(type){
    return request.get(`/bzh/reviewTemplate/getUsedInfoByType/${type}`);
  },
  // 评审组长意见提交
  teamLeaderOpinion(data){
    return request.post(`/bzh/projectReviewTeam/collectOpinion`, data);
  },
  // 生成专家评审意见表pdf
  projectExpertsInfoPdf(data){
    return request.post(`/bzh/projectReviewTeam/createPdfByWindows`, data);
  },
  // 生成
  sendMsgByIdAndTemplateId(id,templateId){
    return request.get(`/bzh/expertsReviewTeam/sendMsgByIdAndTemplateId/${id}/${templateId}`);
  },
  createMsgByIdAndTemplateId(id, templateId) {
    return request.get(`/bzh/expertsReviewTeam/createMsgByIdAndTemplateId/${id}/${templateId}`);
  },
  sendMsgByTeamIdAndTemplateId(id,templateId){
    return request.get(`/bzh/expertsReviewTeam/sendMsgByTeamIdAndTemplateId/${id}/${templateId}`);
  },
  // 根据项目ID组ID获取项目评审记录
  getByTeamIdAndBusinessId(id,teamId){
    return request.get(`/bzh/projectReviewTeam/getByTeamIdAndBusinessId/${id}/${teamId}`);
  }
}

export default review;
